package com.zzy.app.entity.lifecycle;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;
import org.springframework.stereotype.Component;

@Component
public class MyBeanPostProcesser implements BeanPostProcessor {
    @Override
    public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
        System.out.println(beanName + ">>>>>>>>>>>>>postProcessBeforeInitialization");
        //return BeanPostProcessor.super.postProcessBeforeInitialization(bean, beanName);
        return bean;
    }

    @Override
    public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
        System.out.println(beanName + ">>>>>>>>>>>>>postProcessAfterInitialization");
        //return BeanPostProcessor.super.postProcessAfterInitialization(bean, beanName);
        return bean;
    }
}
